/*

This module provides access to a jdbc connection over RMI

getTables()
getFields(String tableName)
createTable(String tableName, String[] rows)
insertRow(String tableName, Object[] row)
select(String tableName, String fieldName, Object fieldValue)
selectAll(String tableName)

It is expected that every time the database is written to,
a notification should be sent out.

*/

package javasec.seed;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

public interface DataSeedInterface extends Remote
{
	public String[] getTables() throws RemoteException;
	public String[] getFields(String tableName) throws RemoteException;
	public boolean createTable(String tableName,String[] rows) throws RemoteException;
	public boolean insertRow(String tableName, Object[] row) throws RemoteException;
	public boolean updateRow(String tableName, Integer id, ArrayList<Object> values) throws RemoteException;
	public boolean updateField(String tableName, Integer id, String fieldName, Object value) throws RemoteException;
	public Object[][] select(String tableName, Object[] query) throws RemoteException;
	public Object[][] selectAll(String tableName) throws RemoteException;
	
	public boolean deleteTable(String tableName) throws RemoteException;
	public boolean deleteRow(String tableName, Integer rowID) throws RemoteException;
	
	public String tagAsset(String value, String aTable, Integer aID) throws RemoteException;
	public String relateAssets(String value, String aTable, Integer aID, String bTable, Integer bID) throws RemoteException;
	
	public byte[] exportXML() throws RemoteException;
	public int importXML(byte[] xmlFile) throws RemoteException;
}
